<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link href="<?php echo base_url(); ?>css/style.css" rel="stylesheet" type="text/css">
    <link href="<?php echo base_url(); ?>css/icon.css" rel="stylesheet" type="text/css">
    
    <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.min.js"></script> 
    <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.hoverIntent.js"></script>     
    <script type="text/javascript" src="<?php echo base_url(); ?>js/main.js"></script>    

</head>
<body data-baseurl="<?=base_url()?>">
    <div id="header">
        <div class="container">
            <div class="header_left fxac">
                <div class="btn-group cats-dropdown left">
                    <div class="dropdown fxac">
                            <a class="white-link fxac" id="open_menu" href="#">
                                <span class="icon-list"></span>
                                Хичээлийн ангилал
                            </a>
                            <div class="dropdown-menu">
                                <ul class="dropdown-menu-list">
                                    <li>
                                        <a href="<?php echo base_url() ?>/site/course/" class="main-cat">
                                            <span>Бүх хичээлийн ангилал</span>
                                        </a>
                                    </li>
                                    <li class="divider"></li>
                                    <?php foreach ($category as $cat) : ?>
                                    <li>
                                        <a href="<?php echo base_url() ?>/site/course/<?php echo $cat['ID'] ?>" class="main-cat">
                                            <span><?php echo $cat['DESCRIPTION']; ?></span>
                                            <?php if(intval($cat['COUNT_SUB_CAT'])!=0) :?>
                                                <i class="icon-next arr"></i>
                                            <?php endif; ?>
                                        </a>
                                        <?php if(intval($cat['COUNT_SUB_CAT'])!=0) :?>
                                        <div class="dropdown-menu sub" id="submenu-development" style="background-image: url(/static/images/discovery/Development.jpg)">
                                            <div class="fxdc h100p">
                                                <h4><?php echo $cat['DESCRIPTION']; ?></h4>
                                                <ul class="sub-list">
                                                <?php foreach ($sub_category as $scat) : ?>
                                                    <?php if($cat['ID']==$scat['CATEGORY_ID']) :?>
                                                        <li><a href="<?php echo base_url() ?>/site/course/<?php echo $cat['ID']."/".$scat['ID']; ?>"><?php echo $scat['DESCRIPTION']; ?></a></li>                                                        
                                                    <?php endif; ?>                                            
                                                <?php endforeach; ?>
                                                </ul> 
                                            </div>
                                        </div>                                                
                                        <?php endif; ?>
                                    </li>
                                    <?php endforeach; ?>                                      
                                </ul>
                            </div>                        
                    </div>
                                        
                </div>
                <div class="search-box left ml15 noleave">
                    <input type="text" id="txtSearchValue" placeholder="Хичээл хайх" name="q" class="search-input noleave" value="" autocomplete="off">
                    <button type="submit" id="btnSearch" class="icon-search-green search-btn noleave"></button>
                    <div class="search-dropdown noleave" id="search-dropdown">
                        <ul class='search-list noleave' id='search-list'>
                             
                        </ul>
                    </div>                     
                </div>
                
                <div class="clr-b"></div>
            </div>
            <div class="header_center"></div>
            <div class="header_right">
                <div class="right links fxac">
                    <a class="white-link fxac" href="#">
                        Хичээл оруулагч болох
                    </a>
                    <span class="green-separator"></span>
                    <a class="white-link fxac" href="#">
                        Нэвтрэх
                    </a>
                    <span class="green-separator"></span>
                    <a class="white-link fxac" href="#">
                        Гишүүн болох
                    </a>                     
                </div>
 
                <div class="clr-b"></div>
            </div>
            <div class="clr-l"></div>
        </div>        
    </div>

</body>
</html>